
#ifndef __PARSE_H_
#define __PARSE_H_

#define MsgHead 0x76
#define MsgType 0x01
#define FileType 0x02
#define MsgVer 0x01
#define MAX_LEN 10240

typedef struct
{
	int header;
	int version;
	int type;
	int total_length;
	int msg_length;
	int data_length;
	char *msg;
	char *data;
} FileMsg;

//解释信息
int parse_msg(int sockfd, char *msg, int length);
//获取routerid
char *get_routerid();
#endif